package com.neuedu.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neuedu.bean.Prescription;


public interface PrescriptionMapper extends BaseMapper<Prescription> {
	//添加数据
	int insertPrescription(Map<String, Object> m);
	//根据患者id和状态，查询药品信息
	List<Map<String,Object>> getPrescriptionRequestAndDrug(Map<String, Object> map);
	//根据id将状态改变，例如从 已开立 转为 已缴费
	int updateStateById(@Param("id")Integer id,@Param("drug_state")String drug_state);
	//根据处方属性得到患者信息 分页
	List<Map<String, Object>> getPrescriptionAndPatientByProperty(
			@Param("case_number")String case_number, 
			@Param("real_name")String real_name,
			@Param("drug_state")String drug_state,
			@Param("nowPageNumber")Integer nowPageNumber,
			@Param("pageSize")Integer pageSize);
	int getPrescriptionAndPatientCountByProperty(@Param("case_number")String case_number, @Param("real_name")String real_name,@Param("drug_state")String drug_state);
	List<Map<String,Object>> getPricePatientDrug(Integer id);
	
	
}
